import requests
import json
import urllib.parse

class Request:
    def get(url, url_params, payload = None, cookie = None):
        url_params = urllib.parse.urlencode(url_params)
        url = url + "?" + url_params
        resp = requests.get(url, params=payload, cookies=cookie)
        return resp.text
    def post(url, body, headers, cookie = {}):
        resp = requests.post(url, data=body, headers=headers, cookies=cookie)
        return resp.text

